<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateProductSkusTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('product_skus', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('spec_value_ids', 300)->comment('规格ID 从低到高排序 JSON数组');
			$table->integer('product_id')->comment('产品ID');
			$table->decimal('sell_price', 10)->comment('销售价格');
			$table->string('thumb')->nullable()->comment('缩略图');
			$table->string('sku_code')->nullable()->comment('自定义编码');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('product_skus');
	}

}
